package com.csust.automaticteach.service;

import com.csust.automaticteach.model.dto.practicesituation.PracticeSituationUpdateRequest;
import com.csust.automaticteach.model.entity.PracticeSituation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.csust.automaticteach.model.entity.User;
import com.csust.automaticteach.model.vo.generateexam.GenerateExamPageVO;
import com.csust.automaticteach.model.vo.practicesituation.PracticeSituationVO;

import java.util.List;
import java.util.Map;

/**
* @author 钰玟
* @description 针对表【t_practice_situation(练习情况表)】的数据库操作Service
* @createDate 2025-07-12 17:22:57
*/
public interface PracticeSituationService extends IService<PracticeSituation> {

    /**
     * 获取练习情况vo对象
     * @param practiceSituation 实体类对象
     * @return vo
     */
    PracticeSituationVO getPracticeSituationVO(PracticeSituation practiceSituation);

    /**
     * 根据错误点获取错误题
     * @param errorPointMap 前三的错误点
     * @return 错误题
     */
    List<String> getTop3ErrorPoints(Map<String,Integer> errorPointMap);
    /**
     * 添加错误点获取错误题
     * @param errorPoints 错误点
     *
     */
    void addErrorPoints(List<String> errorPoints,Map<String, Integer> errorPointMap);

    /**
     * 添加练习情况
     * @param loginUser   登录用户
     * @return 添加结果
     */
    PracticeSituationVO addPracticeSituation(User loginUser);

    /**
     * 修改练习情况
     * @param practiceSituationUpdateRequest 更新参数
     * @return 修改结果
     */
    Boolean updatePracticeSituation(PracticeSituationUpdateRequest practiceSituationUpdateRequest);

    /**
     * 获取班级下所有测试
     *
     * @param classId 班级id
     * @return 考试列表
     */
    List<GenerateExamPageVO> getExamsByClassIdWithStudent(Long classId);
}
